package bjut.zrpc.test.impl;

import bjut.zrpc.core.optimization.annotation.ZRpcInterceptor;
import bjut.zrpc.core.optimization.annotation.ZRpcService;
import interfaces.PeopleService;
import lombok.SneakyThrows;


/**
 * @Author: zhuzhiming
 * @Date: 2022/5/1 20:36
 */
@ZRpcService(group = "zhuzhiming-userinfo", concurrencyControl = true, concurrency = 5)
@ZRpcInterceptor(interceptor = "bjut.zrpc.core.optimization.interceptors.DefaultInterceptor")
public class PeopleServiceImpl implements PeopleService {
    @Override
    public void register() {

    }

    @SneakyThrows
    @Override
    public String userInfo(String username, int age) {
        Thread.sleep(500);
        return "username: " + username + "  age:  " + age;
    }
}
